//
//  HomeCollectionReusableView.m
//  BaseProject
//
//  Created by hundredsandc on 2017/10/26.
//  Copyright © 2017年 hundredsandc. All rights reserved.
//

#import "HomeCollectionReusableView.h"
#import "Masonry.h"

@interface HomeCollectionReusableView ()

@end
@implementation HomeCollectionReusableView
-(instancetype)initWithFrame:(CGRect)frame {
    if (self == [super initWithFrame:frame]) {
  
        
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.font = FONT(15);
        _titleLabel.textColor = RGBCOLOR(0x33, 0x33, 0x33);
        _titleLabel.textAlignment = NSTextAlignmentLeft;
        [self addSubview:_titleLabel];
        
        _subTitleLabel = [[UILabel alloc]init];
        _subTitleLabel.text = @"更多";
        _subTitleLabel.font = FONT(12);
        _subTitleLabel.textColor = RGBCOLOR(0x99, 0x99, 0x99);
        _subTitleLabel.textAlignment = NSTextAlignmentRight;
        [self addSubview:_subTitleLabel];
        
        _rightArrow = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-6-15, 20, 6, 11)];
        _rightArrow.image = [UIImage imageNamed:@"more"];
        [self addSubview:_rightArrow];
        [self addconstraint];
    }
    return self;
}
-(void)addconstraint{
    WS(ws);
    [_titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(ws.mas_left).with.offset(15);
        make.top.equalTo(ws).with.offset(15);
        make.width.mas_equalTo(150);
        make.height.mas_equalTo(21);
    }];
    
    [_subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(_rightArrow.mas_left).with.offset(-6);
        make.top.equalTo(ws).with.offset(15);
        make.width.mas_equalTo(40);
        make.height.mas_equalTo(21);
    }];
}
@end
